VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "DistortSines"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit

' The center about which to twist.
Public amplitude As Single
Public period As Single

' ************************************************
' Apply a shape distorting transformation to
' the point.
' ************************************************
Sub Distort(x As Single, y As Single, z As Single)
Dim A As Single
Dim sy As Single
Dim sz As Single

    A = amplitude / 2
    sy = Sin(y * 6.28 / period)
    sz = Sin(z * 6.28 / period)
    x = x + A * (sy + sz)
End Sub
